CREATE TABLE [dbo].[tb_relfamiliaralumno]
(
[idrelfamiliaralumno] [int] NOT NULL IDENTITY(1, 1),
[alumno] [int] NULL,
[familiar] [int] NULL,
[parentezco] [int] NULL,
[Cargo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_tb_relfamiliaralumno_Cargo] DEFAULT (suser_sname())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_relfamiliaralumno] ADD CONSTRAINT [PK_tb_relfamiliaralumno] PRIMARY KEY CLUSTERED  ([idrelfamiliaralumno]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_relfamiliaralumno] WITH NOCHECK ADD CONSTRAINT [FK_tb_relfamiliaralumno_tb_Alumnos] FOREIGN KEY ([alumno]) REFERENCES [dbo].[tb_Alumnos] ([idAlumno])
GO
ALTER TABLE [dbo].[tb_relfamiliaralumno] WITH NOCHECK ADD CONSTRAINT [FK_tb_relfamiliaralumno_tb_Familia] FOREIGN KEY ([familiar]) REFERENCES [dbo].[tb_Familia] ([idFamilia])
GO
ALTER TABLE [dbo].[tb_relfamiliaralumno] WITH NOCHECK ADD CONSTRAINT [FK_tb_relfamiliaralumno_tb_Parentezcos] FOREIGN KEY ([parentezco]) REFERENCES [dbo].[tb_Parentezcos] ([idParentezco])
GO
